<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.List" %>
<%@ page import="com.example.model.Article" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>应急防护小站 - 守护生命安全</title>
    <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
</head>
<body class="bg-gray-50 min-h-screen text-gray-900">
    <div class="container">
    <!-- 主导航栏 -->
    <nav class="bg-white shadow-sm sticky top-0 z-40">
        <div class="max-w-7xl mx-auto flex items-center justify-between px-4 h-16">
            <div class="flex items-center space-x-2">
                <i class="fa-solid fa-shield-alt text-green-600 text-2xl"></i>
                <span class="text-xl font-bold">应急防护小站</span>
            </div>
            <div class="flex items-center space-x-2">
                <a href="${pageContext.request.contextPath}/index.jsp" class="px-4 py-2${pageContext.request.servletPath == '/index.jsp' ? ' text-green-600 border-b-2 border-green-600 font-medium' : ' hover:text-green-600'}">首页</a>
                <a href="${pageContext.request.contextPath}/quiz" class="px-4 py-2${pageContext.request.servletPath == '/quiz' ? ' text-green-600 border-b-2 border-green-600 font-medium' : ' hover:text-green-600'}">答题功能</a>
                <a href="${pageContext.request.contextPath}/books" class="px-4 py-2${pageContext.request.servletPath == '/books' ? ' text-green-600 border-b-2 border-green-600 font-medium' : ' hover:text-green-600'}">图书购买</a>
                <a href="${pageContext.request.contextPath}/user-profile" class="px-4 py-2${pageContext.request.servletPath == '/user-profile' ? ' text-green-600 border-b-2 border-green-600 font-medium' : ' hover:text-green-600'}">个人信息</a>
                <a href="${pageContext.request.contextPath}/submit-article" class="px-4 py-2${pageContext.request.servletPath == '/submit-article' ? ' text-green-600 border-b-2 border-green-600 font-medium' : ' hover:text-green-600'}">我要投稿</a>
                <a href="${pageContext.request.contextPath}/feedback" class="px-4 py-2${pageContext.request.servletPath == '/feedback' ? ' text-green-600 border-b-2 border-green-600 font-medium' : ' hover:text-green-600'}">问题反馈</a>
                <a href="${pageContext.request.contextPath}/wrong-questions" class="px-4 py-2 hover:text-orange-500 flex items-center"><i class="fa-solid fa-book-open mr-1"></i>错题本</a>
            </div>
            <div class="hidden md:flex items-center text-gray-400 text-xs ml-4">
                <i class="fa-regular fa-eye mr-1"></i>1次访问
            </div>
        </div>
    </nav>
    <!-- 头图推荐区 -->
    <section class="max-w-7xl mx-auto mt-8 px-4">
        <div class="flex flex-col md:flex-row gap-6">
            <div class="bg-blue-600 rounded-2xl p-8 flex-1 flex flex-col justify-center text-white shadow-lg">
                <h2 class="text-2xl md:text-3xl font-bold mb-2">地震应急防护：关键时刻的生存指南</h2>
                <p class="mb-4">地震来临时，正确的防护措施和应急准备可以大大降低伤亡风险，保护生命安全。</p>
                <a href="disaster-earthquake.jsp" class="underline hover:text-blue-200">阅读全文 <i class="fa-solid fa-arrow-right"></i></a>
            </div>
            <div class="flex-1 flex items-center justify-center">
                <img src="https://img1.baidu.com/it/u=1812345678,1234567890&fm=253&fmt=auto&app=138&f=JPEG?w=600&h=400" alt="头图" class="rounded-2xl w-full h-48 md:h-56 object-cover shadow"/>
            </div>
        </div>
    </section>
    <!-- 最新防护文章区 -->
    <section class="max-w-7xl mx-auto mt-12 px-4">
        <h2 class="text-xl font-bold mb-4 flex items-center"><i class="fa-regular fa-newspaper text-blue-600 mr-2"></i>最新防护文章</h2>
        <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
            <% List<com.example.model.Article> articles = (List<com.example.model.Article>) request.getAttribute("articles");
               if (articles != null) {
                   for (com.example.model.Article article : articles) { %>
                <div class="bg-white rounded-xl shadow p-6 flex flex-col justify-between hover:shadow-2xl transition">
                    <div>
                        <h3 class="font-semibold text-lg mb-2"><a href="${pageContext.request.contextPath}/article-detail?id=<%= article.getId() %>" class="hover:text-blue-600"><%= article.getTitle() %></a></h3>
                        <div class="text-gray-500 text-sm mb-2"><%= article.getType() %> | <%= article.getAuthor() %></div>
                        <div class="text-gray-400 text-xs mb-2"><%= article.getDate() %></div>
                        <p class="text-gray-600 text-sm line-clamp-2 mb-2"><%= article.getSummary() != null ? article.getSummary() : "" %></p>
                    </div>
                    <div class="flex items-center justify-between mt-2">
                        <div class="flex items-center text-gray-400 text-sm">
                            <i class="fa-regular fa-thumbs-up mr-1"></i><span><%= article.getLikes() %></span>
                        </div>
                        <a href="${pageContext.request.contextPath}/article-detail?id=<%= article.getId() %>" class="text-blue-600 hover:underline">阅读全文</a>
                    </div>
                </div>
            <%   }
               } else { %>
                <div class="col-span-2 text-center text-gray-400">暂无文章推荐</div>
            <% } %>
        </div>
        <div class="flex justify-end mt-4">
            <a href="${pageContext.request.contextPath}/article" class="text-blue-600 hover:underline text-sm flex items-center">查看更多文章 <i class="fa-solid fa-arrow-right ml-1"></i></a>
        </div>
    </section>
    <!-- 为你推荐区 -->
    <section id="recommend" class="max-w-7xl mx-auto mt-12 px-4">
        <h2 class="text-xl font-bold mb-4 flex items-center"><i class="fa-solid fa-thumbs-up text-blue-600 mr-2"></i>推荐文章</h2>
        <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
            <!-- 火灾逃生指南 -->
            <div class="bg-white rounded-xl shadow p-6 flex flex-col justify-between hover:shadow-2xl transition">
                <img src="https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=400&q=80" alt="火灾防护" class="w-full h-32 object-cover rounded-lg mb-4">
                <div>
                    <h3 class="font-semibold text-base mb-2">火灾逃生指南：如何在火场中保护自己？</h3>
                    <div class="text-gray-500 text-xs mb-2">2025-07-01</div>
                    <p class="text-gray-600 text-sm line-clamp-2 mb-2">火灾是最常见的突发灾害之一，掌握正确的逃生技巧和防护知识至关重要。</p>
                </div>
                <div class="flex items-center justify-between mt-2">
                    <div class="flex items-center text-gray-400 text-sm"><i class="fa-regular fa-thumbs-up mr-1"></i>98</div>
                    <a href="${pageContext.request.contextPath}/disaster-fire.jsp" class="text-blue-600 hover:underline text-sm">阅读全文</a>
                </div>
            </div>
            <!-- 台风防护手册 -->
            <div class="bg-white rounded-xl shadow p-6 flex flex-col justify-between hover:shadow-2xl transition">
                <img src="https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=400&q=80" alt="台风防护" class="w-full h-32 object-cover rounded-lg mb-4">
                <div>
                    <h3 class="font-semibold text-base mb-2">台风防护手册：台风来临前的准备工作</h3>
                    <div class="text-gray-500 text-xs mb-2">2025-06-30</div>
                    <p class="text-gray-600 text-sm line-clamp-2 mb-2">台风是沿海地区常见的自然灾害，提前做好防护准备可以有效减少损失。</p>
                </div>
                <div class="flex items-center justify-between mt-2">
                    <div class="flex items-center text-gray-400 text-sm"><i class="fa-regular fa-thumbs-up mr-1"></i>156</div>
                    <a href="${pageContext.request.contextPath}/disaster-typhoon.jsp" class="text-blue-600 hover:underline text-sm">阅读全文</a>
                </div>
            </div>
            <!-- 洪水自救指南 -->
            <div class="bg-white rounded-xl shadow p-6 flex flex-col justify-between hover:shadow-2xl transition">
                <img src="https://images.unsplash.com/photo-1464983953574-0892a716854b?auto=format&fit=crop&w=400&q=80" alt="洪水防护" class="w-full h-32 object-cover rounded-lg mb-4">
                <div>
                    <h3 class="font-semibold text-base mb-2">洪水自救指南：被困时的应急措施</h3>
                    <div class="text-gray-500 text-xs mb-2">2025-06-28</div>
                    <p class="text-gray-600 text-sm line-clamp-2 mb-2">洪水来临时，正确的自救方法和应急装备可以大大提高生存几率。</p>
                </div>
                <div class="flex items-center justify-between mt-2">
                    <div class="flex items-center text-gray-400 text-sm"><i class="fa-regular fa-thumbs-up mr-1"></i>132</div>
                    <a href="${pageContext.request.contextPath}/disaster-flood.jsp" class="text-blue-600 hover:underline text-sm">阅读全文</a>
                </div>
            </div>
            <!-- 极端高温防护 -->
            <div class="bg-white rounded-xl shadow p-6 flex flex-col justify-between hover:shadow-2xl transition">
                <img src="https://images.unsplash.com/photo-1502082553048-f009c37129b9?auto=format&fit=crop&w=400&q=80" alt="极端高温" class="w-full h-32 object-cover rounded-lg mb-4">
                <div>
                    <h3 class="font-semibold text-base mb-2">极端高温防护：夏季防暑降温指南</h3>
                    <div class="text-gray-500 text-xs mb-2">2025-06-25</div>
                    <p class="text-gray-600 text-sm line-clamp-2 mb-2">极端高温天气对人体健康威胁很大，掌握防暑降温技巧很重要。</p>
                </div>
                <div class="flex items-center justify-between mt-2">
                    <div class="flex items-center text-gray-400 text-sm"><i class="fa-regular fa-thumbs-up mr-1"></i>78</div>
                    <a href="${pageContext.request.contextPath}/disaster-extremeheat.jsp" class="text-blue-600 hover:underline text-sm">阅读全文</a>
                </div>
            </div>
            <!-- 雪灾防护指南 -->
            <div class="bg-white rounded-xl shadow p-6 flex flex-col justify-between hover:shadow-2xl transition">
                <img src="https://images.unsplash.com/photo-1519681393784-d120267933ba?auto=format&fit=crop&w=400&q=80" alt="雪灾防护" class="w-full h-32 object-cover rounded-lg mb-4">
                <div>
                    <h3 class="font-semibold text-base mb-2">雪灾防护指南：严寒天气的应对措施</h3>
                    <div class="text-gray-500 text-xs mb-2">2025-06-22</div>
                    <p class="text-gray-600 text-sm line-clamp-2 mb-2">雪灾天气对交通和日常生活影响很大，了解防护措施很重要。</p>
                </div>
                <div class="flex items-center justify-between mt-2">
                    <div class="flex items-center text-gray-400 text-sm"><i class="fa-regular fa-thumbs-up mr-1"></i>65</div>
                    <a href="${pageContext.request.contextPath}/disaster-snowstorm.jsp" class="text-blue-600 hover:underline text-sm">阅读全文</a>
                </div>
            </div>
            <!-- 山体滑坡防护 -->
            <div class="bg-white rounded-xl shadow p-6 flex flex-col justify-between hover:shadow-2xl transition">
                <img src="https://images.unsplash.com/photo-1500534314209-a25ddb2bd429?auto=format&fit=crop&w=400&q=80" alt="山体滑坡" class="w-full h-32 object-cover rounded-lg mb-4">
                <div>
                    <h3 class="font-semibold text-base mb-2">山体滑坡防护：地质灾害的预防与应对</h3>
                    <div class="text-gray-500 text-xs mb-2">2025-06-20</div>
                    <p class="text-gray-600 text-sm line-clamp-2 mb-2">山体滑坡是严重的地质灾害，了解预警信号和防护措施至关重要。</p>
                </div>
                <div class="flex items-center justify-between mt-2">
                    <div class="flex items-center text-gray-400 text-sm"><i class="fa-regular fa-thumbs-up mr-1"></i>89</div>
                    <a href="${pageContext.request.contextPath}/disaster-landslide.jsp" class="text-blue-600 hover:underline text-sm">阅读全文</a>
                </div>
            </div>
            <!-- 疫情防护指南 -->
            <div class="bg-white rounded-xl shadow p-6 flex flex-col justify-between hover:shadow-2xl transition">
                <img src="https://images.unsplash.com/photo-1584036561566-baf8f5f1b144?auto=format&fit=crop&w=400&q=80" alt="疫情防护" class="w-full h-32 object-cover rounded-lg mb-4">
                <div>
                    <h3 class="font-semibold text-base mb-2">疫情防护指南：个人卫生与防护措施</h3>
                    <div class="text-gray-500 text-xs mb-2">2025-06-18</div>
                    <p class="text-gray-600 text-sm line-clamp-2 mb-2">疫情防护需要个人和社会的共同努力，掌握正确的防护方法很重要。</p>
                </div>
                <div class="flex items-center justify-between mt-2">
                    <div class="flex items-center text-gray-400 text-sm"><i class="fa-regular fa-thumbs-up mr-1"></i>112</div>
                    <a href="${pageContext.request.contextPath}/disaster-pandemic.jsp" class="text-blue-600 hover:underline text-sm">阅读全文</a>
                </div>
            </div>
            <!-- 综合灾害防护 -->
            <div class="bg-white rounded-xl shadow p-6 flex flex-col justify-between hover:shadow-2xl transition">
                <img src="https://images.unsplash.com/photo-1465101046530-73398c7f28ca?auto=format&fit=crop&w=400&q=80" alt="综合灾害" class="w-full h-32 object-cover rounded-lg mb-4">
                <div>
                    <h3 class="font-semibold text-base mb-2">综合灾害防护：多灾种应对策略</h3>
                    <div class="text-gray-500 text-xs mb-2">2025-06-15</div>
                    <p class="text-gray-600 text-sm line-clamp-2 mb-2">了解各种灾害的特点和防护方法，提高综合应对能力。</p>
                </div>
                <div class="flex items-center justify-between mt-2">
                    <div class="flex items-center text-gray-400 text-sm"><i class="fa-regular fa-thumbs-up mr-1"></i>145</div>
                    <a href="${pageContext.request.contextPath}/disaster.jsp" class="text-blue-600 hover:underline text-sm">阅读全文</a>
                </div>
            </div>
            <!-- 地震应急防护 -->
            <div class="bg-white rounded-xl shadow p-6 flex flex-col justify-between hover:shadow-2xl transition">
                <img src="https://images.unsplash.com/photo-1501785888041-af3ef285b470?auto=format&fit=crop&w=400&q=80" alt="地震防护" class="w-full h-32 object-cover rounded-lg mb-4">
                <div>
                    <h3 class="font-semibold text-base mb-2">地震应急防护：关键时刻的生存指南</h3>
                    <div class="text-gray-500 text-xs mb-2">2025-06-12</div>
                    <p class="text-gray-600 text-sm line-clamp-2 mb-2">地震来临时，正确的防护措施和应急准备可以大大降低伤亡风险。</p>
                </div>
                <div class="flex items-center justify-between mt-2">
                    <div class="flex items-center text-gray-400 text-sm"><i class="fa-regular fa-thumbs-up mr-1"></i>167</div>
                    <a href="${pageContext.request.contextPath}/disaster-earthquake.jsp" class="text-blue-600 hover:underline text-sm">阅读全文</a>
                </div>
            </div>
            <!-- 防护知识答题 -->
            <div class="bg-white rounded-xl shadow p-6 flex flex-col justify-between hover:shadow-2xl transition">
                <img src="https://images.unsplash.com/photo-1519125323398-675f0ddb6308?auto=format&fit=crop&w=400&q=80" alt="防护知识答题" class="w-full h-32 object-cover rounded-lg mb-4">
                <div>
                    <h3 class="font-semibold text-base mb-2">防护知识答题：测试你的应急能力</h3>
                    <div class="text-gray-500 text-xs mb-2">2025-06-10</div>
                    <p class="text-gray-600 text-sm line-clamp-2 mb-2">通过答题测试了解自己的防护知识水平，提高应急应对能力。</p>
                </div>
                <div class="flex items-center justify-between mt-2">
                    <div class="flex items-center text-gray-400 text-sm"><i class="fa-regular fa-thumbs-up mr-1"></i>203</div>
                    <a href="${pageContext.request.contextPath}/quiz.jsp" class="text-blue-600 hover:underline text-sm">开始答题</a>
                </div>
            </div>
            <!-- 防护图书购买 -->
            <div class="bg-white rounded-xl shadow p-6 flex flex-col justify-between hover:shadow-2xl transition">
                <img src="https://images.unsplash.com/photo-1516979187457-637abb4f9353?auto=format&fit=crop&w=400&q=80" alt="防护图书" class="w-full h-32 object-cover rounded-lg mb-4">
                <div>
                    <h3 class="font-semibold text-base mb-2">防护图书购买：专业防护知识手册</h3>
                    <div class="text-gray-500 text-xs mb-2">2025-06-08</div>
                    <p class="text-gray-600 text-sm line-clamp-2 mb-2">购买专业的防护图书，系统学习各种灾害的防护知识。</p>
                </div>
                <div class="flex items-center justify-between mt-2">
                    <div class="flex items-center text-gray-400 text-sm"><i class="fa-regular fa-thumbs-up mr-1"></i>134</div>
                    <a href="${pageContext.request.contextPath}/books" class="text-blue-600 hover:underline text-sm">查看图书</a>
                </div>
            </div>
            <!-- 问题反馈 -->
            <div class="bg-white rounded-xl shadow p-6 flex flex-col justify-between hover:shadow-2xl transition">
                <img src="https://images.unsplash.com/photo-1465101178521-c1a9136a3b99?auto=format&fit=crop&w=400&q=80" alt="问题反馈" class="w-full h-32 object-cover rounded-lg mb-4">
                <div>
                    <h3 class="font-semibold text-base mb-2">问题反馈：帮助我们改进服务</h3>
                    <div class="text-gray-500 text-xs mb-2">2025-06-05</div>
                    <p class="text-gray-600 text-sm line-clamp-2 mb-2">如果您有任何问题或建议，欢迎通过反馈系统联系我们。</p>
                </div>
                <div class="flex items-center justify-between mt-2">
                    <div class="flex items-center text-gray-400 text-sm"><i class="fa-regular fa-thumbs-up mr-1"></i>87</div>
                    <a href="${pageContext.request.contextPath}/feedback.jsp" class="text-blue-600 hover:underline text-sm">提交反馈</a>
                </div>
            </div>
        </div>
    </section>
    <!-- 热门话题区 -->
    <section id="hot" class="max-w-7xl mx-auto mt-12 px-4">
        <h2 class="text-xl font-bold mb-4 flex items-center"><i class="fa-solid fa-fire text-orange-500 mr-2"></i>热门话题</h2>
        <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
            <div class="bg-white rounded-xl shadow p-4 flex items-center justify-between">
                <div class="flex items-center"><i class="fa-solid fa-house-fire text-red-500 mr-2"></i>火灾防护</div>
                <span class="text-gray-400 text-xs">128 篇文章</span>
            </div>
            <div class="bg-white rounded-xl shadow p-4 flex items-center justify-between">
                <div class="flex items-center"><i class="fa-solid fa-mountain text-green-500 mr-2"></i>地震防护</div>
                <span class="text-gray-400 text-xs">96 篇文章</span>
            </div>
            <div class="bg-white rounded-xl shadow p-4 flex items-center justify-between">
                <div class="flex items-center"><i class="fa-solid fa-tornado text-blue-400 mr-2"></i>台风防护</div>
                <span class="text-gray-400 text-xs">156 篇文章</span>
            </div>
            <div class="bg-white rounded-xl shadow p-4 flex items-center justify-between">
                <div class="flex items-center"><i class="fa-solid fa-water text-blue-500 mr-2"></i>洪水防护</div>
                <span class="text-gray-400 text-xs">87 篇文章</span>
            </div>
        </div>
    </section>
    <!-- 关于我们区 -->
    <section id="about" class="max-w-7xl mx-auto mt-12 px-4 mb-16">
        <h2 class="text-xl font-bold mb-4 flex items-center"><i class="fa-solid fa-circle-info text-blue-600 mr-2"></i>关于应急防护小站</h2>
        <div class="bg-white rounded-xl shadow p-8 grid grid-cols-1 md:grid-cols-3 gap-8">
            <div>
                <h3 class="font-semibold mb-2">我们的愿景</h3>
                <p class="text-gray-600 text-sm">成为中国最具影响力的应急防护平台，让安全知识走进千家万户。</p>
            </div>
            <div>
                <h3 class="font-semibold mb-2">我们的价值观</h3>
                <p class="text-gray-600 text-sm">专业、实用、及时、可靠，用科学的态度传递防护知识。</p>
            </div>
            <div>
                <h3 class="font-semibold mb-2">联系我们</h3>
                <p class="text-gray-600 text-sm">邮箱：contact@emergency.com<br>电话：400-123-4567</p>
            </div>
        </div>
    </section>
    <!-- 底部深色信息区 -->
    <footer class="bg-gray-900 text-white py-10">
        <div class="max-w-7xl mx-auto px-4">
            <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
                <div>
                    <div class="flex items-center space-x-2 mb-4">
                        <i class="fa-solid fa-shield-alt text-blue-400 text-2xl"></i>
                        <span class="text-xl font-bold">应急防护小站</span>
                    </div>
                    <p class="text-gray-400 text-sm mb-4">守护生命安全</p>
                    <div class="flex space-x-4">
                        <a href="#" class="text-gray-400 hover:text-white"><i class="fa-brands fa-weibo"></i></a>
                        <a href="#" class="text-gray-400 hover:text-white"><i class="fa-brands fa-weixin"></i></a>
                        <a href="#" class="text-gray-400 hover:text-white"><i class="fa-brands fa-twitter"></i></a>
                    </div>
                </div>
                <div>
                    <h3 class="text-lg font-medium mb-4">防护分类</h3>
                    <ul class="space-y-2 text-gray-400">
                        <li><a href="${pageContext.request.contextPath}/disaster-earthquake.jsp" class="hover:text-white">地震防护</a></li>
                        <li><a href="${pageContext.request.contextPath}/disaster-fire.jsp" class="hover:text-white">火灾防护</a></li>
                        <li><a href="${pageContext.request.contextPath}/disaster-typhoon.jsp" class="hover:text-white">台风防护</a></li>
                        <li><a href="${pageContext.request.contextPath}/disaster-flood.jsp" class="hover:text-white">洪水防护</a></li>
                        <li><a href="${pageContext.request.contextPath}/disaster-extremeheat.jsp" class="hover:text-white">极端天气</a></li>
                    </ul>
                </div>
                <div>
                    <h3 class="text-lg font-medium mb-4">快速链接</h3>
                    <ul class="space-y-2 text-gray-400">
                        <li><a href="#about" class="hover:text-white">关于我们</a></li>
                        <li><a href="${pageContext.request.contextPath}/submit-article" class="hover:text-white">我要投稿</a></li>
                        <li><a href="${pageContext.request.contextPath}/books" class="hover:text-white">防护用品</a></li>
                        <li><a href="${pageContext.request.contextPath}/feedback" class="hover:text-white">问题反馈</a></li>
                        <li><a href="#" class="hover:text-white">隐私政策</a></li>
                    </ul>
                </div>
                <div>
                    <h3 class="text-lg font-medium mb-4">订阅我们</h3>
                    <p class="text-gray-400 text-sm mb-4">订阅我们的防护周刊，获取最新应急资讯</p>
                    <div class="flex">
                        <input type="email" placeholder="输入您的邮箱" class="px-4 py-2 rounded-l-lg w-full focus:outline-none focus:ring-2 focus:ring-blue-400">
                        <button class="bg-blue-600 hover:bg-blue-700 text-white px-4 rounded-r-lg"><i class="fa-solid fa-paper-plane"></i></button>
                    </div>
                </div>
            </div>
            <div class="border-t border-gray-800 mt-8 pt-8 text-center text-gray-500 text-sm">
                <p>&copy; 2025 应急防护小站. 保留所有权利.</p>
            </div>
        </div>
    </footer>
    <%
        boolean isLogin = session.getAttribute("user") != null;
    %>
    <script>
        // 显示当前日期
        document.addEventListener('DOMContentLoaded', function() {
            const now = new Date();
            const options = { year: 'numeric', month: 'long', day: 'numeric', weekday: 'long' };
            document.getElementById('current-date').textContent = now.toLocaleDateString('zh-CN', options);
        });
        // 登录判断，未登录跳转到登录页
        var isLogin = '<%= isLogin ? "true" : "false" %>';
        function checkLogin(url) {
            if (isLogin === 'false') {
                window.location.href = 'login.jsp';
            } else {
                window.location.href = url;
            }
            return false;
        }
    </script>
    </div>
</body>
</html> 